home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
027a
/
foxcolor.zip
/
UTCOLOR.DOC
< prev
next >
Wrap
Text File
|
1991-05-11
|
5KB
|
121 lines
***------------------------------------------------------***
*** DOCUMENTATION OF THE COLOR-PICKER BY FRAN WILLIAMSON ***
***------------------------------------------------------***
FILES: UTCOLOR.DOC
UTCOLOR.PRG
UTCOLOR.DBF
The color picker program will dynamically change colors on the screen during
the FoxPro application and may be used as a selection from a main menu.
The programs use the following FoxPro commands:
SET COLOR OF NORMAL TO ...
SET COLOR OF MESSAGES TO ...
SET COLOR OF TITLES TO ...
SET COLOR OF BOX TO ...
SET COLOR OF HIGHLIGHT TO ...
SET COLOR OF INFORMATION TO ...
SET COLOR OF FIELDS TO ...
For more information on the following, see TOM RETTIG'S FOXPRO HANDBOOK,
Bantam Books, June 1990, Pages 646, 647, and 158.
SCHEMES* COLOR PAIR
NORMAL 1 1 text output, disabled menu bars, pads
MESSAGES 2 1 text output, disabled menu bars, pads
TITLES 1,2 4 active object titles
BOX 1,2 3 border
HIGHLIGHT 1,2 6 selected objects, text, menu bars, pads
INFORMATION 1,2 7 hot keys, clock, current BROWSE record
FIELDS 1 2 current field, input, enabled menu bars
and pads
* 1 = USER WINDOWS
2 = USER MENUS
NOTE: In order to use the color-picker program, include the following code
in your application program.
*---BEGIN COLOR INFORMATION
** The following COLOR variables and coding requires the use of the
** UTCOLOR.DBF file and allows the use of the UTCOLOR.PRG color-
** picker program.
PUBLIC MBACK, MTEXT, MSAYS, MMENU, MTITL, MBOXS, MHIGH, MHOTK, MGETS,;
MERRMSG, MWRNMSG, COLRAREA, WINDOWNM, MDELAST
STORE SPACE(10) TO WINDOWNM
COLRAREA = 25
SELECT (COLRAREA)
USE UTCOLOR && This database is a standard
LOCATE FOR PICKED <> ' '
IF .NOT. FOUND()
LOCATE FOR NAME = 'IBM' /or/ LOCATE FOR NAME = 'MONOCHROME'
REPLACE PICKED WITH 'X'
ENDIF
STORE TRIM(BACK) TO MBACK
STORE TRIM(TEXT)+'/'+MBACK TO MTEXT
STORE TRIM(SAYS)+'/'+MBACK TO MSAYS
STORE TRIM(GETS) TO MGETS
STORE MGETS TO MDELAST
STORE TRIM(MENU) TO MMENU
STORE TRIM(BOXS) TO MBOXS
STORE TRIM(TITL) TO MTITL
STORE TRIM(HIGH) TO MHIGH
STORE TRIM(HOTK) TO MHOTK
STORE TRIM(ERRMSG) TO MERRMSG
STORE TRIM(WRNMSG) TO MWRNMSG
USE
SET COLOR OF NORMAL TO &MTEXT && NORMAL=All SAY commands
SET COLOR OF MESSAGES TO &MMENU && MESSAGES=Disabled menu bars
SET COLOR OF TITLES TO &MTITL && TITLES=Active object titles
SET COLOR OF BOX TO &MBOXS && BOX=Borders (not BOX command)
SET COLOR OF HIGHLIGHT TO &MHIGH && HIGHLIGHT=Selected objects
SET COLOR OF INFORMATION TO &MHOTK && INFORMATION=Hot keys
SET COLOR OF FIELDS TO &MGETS && FIELDS=All GET commands
** The additional SET commands below are used to change the normal
** colors set above. Be sure to re-SET to statement above when
** exiting program.
** SET NORMAL TO MSAYS ---------Use this when SAYing data.
** This allows SAYS of data to match
** the GETS except for reverse video.
** SET INFORMATION TO MDELAST---Use in BROWSE WINDOWS when deletion
** is allowed in order for the delete
** asterisk to be visible.
**
*---END COLOR INFORMATION
NOTE: On a browse window, when a record has been marked for deletion, the
deletion bullet is the same color as the background color of
INFORMATION. If INFORMATION background is the same as the NORMAL
background, the bullet is not visible. A variable called MDELAST
(delete asterisk) contains the color of FIELDS. At the beginning of
a browse program include the statement:
SET COLOR OF INFORMATION TO &MDELAST.
At the end of the browse, re-set INFORMATION, with the following
statement:
SET COLOR OF INFORM
You may include the Color-Picker option on the menu of your system for the
users to change their color set. When the Color-Picker option is chosen,
DO UTCOLOR. UTCOLOR will allow the user to pick a different color set or
add a new color set. When the user has selected the new color set, UTCOLOR
will change the colors via the SET COLOR OF ... statements.
Upon return from UTCOLOR, your application must re-install the menu bar and
pads to show the new colors on the screen.
NOTE: High-intensity colors are not used on backgrounds because highlighted
backgrounds cause blinking on a CGA screen.
Hope you like this. If you have any questions, problems, or comments, please
call Fran Williamson, Jefferson County Public Schools, (303)273-6869 or her
collaborator, Ida Valdez, (303) 273-6868.